package eteam.aps.systeminterface.model.enums;

import com.baomidou.mybatisplus.annotation.EnumValue;
import com.fasterxml.jackson.annotation.JsonValue;
import eteam.aps.common.enumeration.IBaseEnum;

/**
 * 是否枚举
 */
public enum WhetherEnum implements IBaseEnum<Integer> {
    /**
     * 否
     */
    No(0, "否"),
    /**
     * 是
     */
    Yes(1, "是");

    @EnumValue
    @JsonValue
    private int val = 0;

    private String label = "";

    private WhetherEnum(int value, String desc) {
        val = value;
        label = desc;
    }

    @Override
    public Integer getValue() {
        return val;
    }

    @Override
    public String getDescription() {
        return label;
    }
}
